package vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.providers;

import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;

import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.AdaptedauiPackage;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractPresentationEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractUIComponent2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.AbstractUIComponentEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.ActivatorEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.CommandDestinationsEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.InputFieldEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.MultipleChoiceEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.NavigatorEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.OutputFieldEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationContainerRelationshipEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationSystemEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship10EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship11EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship3EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship4EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship5EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship6EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship7EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship8EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationship9EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationTemporalRelationshipEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.PresentationUnitEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.SingleChoiceEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UIContainerRelationshipEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship10EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship11EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship2EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship3EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship4EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship5EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship6EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship7EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship8EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationship9EditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.parts.UITemporalRelationshipEditPart;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.part.AdaptedauiDiagramEditorPlugin;

/**
 * @generated
 */
public class AdaptedauiElementTypes {

	/**
	 * @generated
	 */
	private AdaptedauiElementTypes() {
	}

	/**
	 * @generated
	 */
	private static Map<IElementType, ENamedElement> elements;

	/**
	 * @generated
	 */
	private static ImageRegistry imageRegistry;

	/**
	 * @generated
	 */
	private static Set<IElementType> KNOWN_ELEMENT_TYPES;

	/**
	 * @generated
	 */
	public static final IElementType PresentationSystem_1000 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationSystem_1000"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationUnit_2001 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationUnit_2001"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType AbstractPresentation_2002 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.AbstractPresentation_2002"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType AbstractUIComponent_3001 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.AbstractUIComponent_3001"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType MultipleChoice_3002 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.MultipleChoice_3002"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType InputField_3003 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.InputField_3003"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType OutputField_3004 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.OutputField_3004"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Navigator_3005 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.Navigator_3005"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType SingleChoice_3006 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.SingleChoice_3006"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Activator_3007 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.Activator_3007"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType AbstractUIComponent_3009 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.AbstractUIComponent_3009"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4001 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4001"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4002 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4002"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4003 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4003"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4004 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4004"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4005 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4005"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4006 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4006"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4007 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4007"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4008 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4008"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4009 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4009"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4010 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4010"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UITemporalRelationship_4011 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UITemporalRelationship_4011"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType UIContainerRelationship_4012 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.UIContainerRelationship_4012"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationContainerRelationship_4013 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationContainerRelationship_4013"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType CommandDestinations_4014 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.CommandDestinations_4014"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4015 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4015"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4016 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4016"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4017 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4017"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4018 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4018"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4019 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4019"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4020 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4020"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4021 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4021"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4022 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4022"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4023 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4023"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4024 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4024"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PresentationTemporalRelationship_4025 = getElementType("vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.PresentationTemporalRelationship_4025"); //$NON-NLS-1$

	/**
	 * @generated
	 */
	private static ImageRegistry getImageRegistry() {
		if (imageRegistry == null) {
			imageRegistry = new ImageRegistry();
		}
		return imageRegistry;
	}

	/**
	 * @generated
	 */
	private static String getImageRegistryKey(ENamedElement element) {
		return element.getName();
	}

	/**
	 * @generated
	 */
	private static ImageDescriptor getProvidedImageDescriptor(
			ENamedElement element) {
		if (element instanceof EStructuralFeature) {
			EStructuralFeature feature = ((EStructuralFeature) element);
			EClass eContainingClass = feature.getEContainingClass();
			EClassifier eType = feature.getEType();
			if (eContainingClass != null && !eContainingClass.isAbstract()) {
				element = eContainingClass;
			} else if (eType instanceof EClass
					&& !((EClass) eType).isAbstract()) {
				element = eType;
			}
		}
		if (element instanceof EClass) {
			EClass eClass = (EClass) element;
			if (!eClass.isAbstract()) {
				return AdaptedauiDiagramEditorPlugin.getInstance()
						.getItemImageDescriptor(
								eClass.getEPackage().getEFactoryInstance()
										.create(eClass));
			}
		}
		// TODO : support structural features
		return null;
	}

	/**
	 * @generated
	 */
	public static ImageDescriptor getImageDescriptor(ENamedElement element) {
		String key = getImageRegistryKey(element);
		ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(key);
		if (imageDescriptor == null) {
			imageDescriptor = getProvidedImageDescriptor(element);
			if (imageDescriptor == null) {
				imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
			}
			getImageRegistry().put(key, imageDescriptor);
		}
		return imageDescriptor;
	}

	/**
	 * @generated
	 */
	public static Image getImage(ENamedElement element) {
		String key = getImageRegistryKey(element);
		Image image = getImageRegistry().get(key);
		if (image == null) {
			ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element);
			if (imageDescriptor == null) {
				imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
			}
			getImageRegistry().put(key, imageDescriptor);
			image = getImageRegistry().get(key);
		}
		return image;
	}

	/**
	 * @generated
	 */
	public static ImageDescriptor getImageDescriptor(IAdaptable hint) {
		ENamedElement element = getElement(hint);
		if (element == null) {
			return null;
		}
		return getImageDescriptor(element);
	}

	/**
	 * @generated
	 */
	public static Image getImage(IAdaptable hint) {
		ENamedElement element = getElement(hint);
		if (element == null) {
			return null;
		}
		return getImage(element);
	}

	/**
	 * Returns 'type' of the ecore object associated with the hint.
	 * 
	 * @generated
	 */
	public static ENamedElement getElement(IAdaptable hint) {
		Object type = hint.getAdapter(IElementType.class);
		if (elements == null) {
			elements = new IdentityHashMap<IElementType, ENamedElement>();

			elements.put(PresentationSystem_1000,
					AdaptedauiPackage.eINSTANCE.getPresentationSystem());

			elements.put(PresentationUnit_2001,
					AdaptedauiPackage.eINSTANCE.getPresentationUnit());

			elements.put(AbstractPresentation_2002,
					AdaptedauiPackage.eINSTANCE.getAbstractPresentation());

			elements.put(AbstractUIComponent_3001,
					AdaptedauiPackage.eINSTANCE.getAbstractUIComponent());

			elements.put(MultipleChoice_3002,
					AdaptedauiPackage.eINSTANCE.getMultipleChoice());

			elements.put(InputField_3003,
					AdaptedauiPackage.eINSTANCE.getInputField());

			elements.put(OutputField_3004,
					AdaptedauiPackage.eINSTANCE.getOutputField());

			elements.put(Navigator_3005,
					AdaptedauiPackage.eINSTANCE.getNavigator());

			elements.put(SingleChoice_3006,
					AdaptedauiPackage.eINSTANCE.getSingleChoice());

			elements.put(Activator_3007,
					AdaptedauiPackage.eINSTANCE.getActivator());

			elements.put(AbstractUIComponent_3009,
					AdaptedauiPackage.eINSTANCE.getAbstractUIComponent());

			elements.put(UITemporalRelationship_4001,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4002,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4003,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4004,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4005,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4006,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4007,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4008,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4009,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4010,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UITemporalRelationship_4011,
					AdaptedauiPackage.eINSTANCE.getUITemporalRelationship());

			elements.put(UIContainerRelationship_4012,
					AdaptedauiPackage.eINSTANCE.getUIContainerRelationship());

			elements.put(PresentationContainerRelationship_4013,
					AdaptedauiPackage.eINSTANCE
							.getPresentationContainerRelationship());

			elements.put(CommandDestinations_4014,
					AdaptedauiPackage.eINSTANCE.getCommand_Destinations());

			elements.put(PresentationTemporalRelationship_4015,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4016,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4017,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4018,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4019,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4020,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4021,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4022,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4023,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4024,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());

			elements.put(PresentationTemporalRelationship_4025,
					AdaptedauiPackage.eINSTANCE
							.getPresentationTemporalRelationship());
		}
		return (ENamedElement) elements.get(type);
	}

	/**
	 * @generated
	 */
	private static IElementType getElementType(String id) {
		return ElementTypeRegistry.getInstance().getType(id);
	}

	/**
	 * @generated
	 */
	public static boolean isKnownElementType(IElementType elementType) {
		if (KNOWN_ELEMENT_TYPES == null) {
			KNOWN_ELEMENT_TYPES = new HashSet<IElementType>();
			KNOWN_ELEMENT_TYPES.add(PresentationSystem_1000);
			KNOWN_ELEMENT_TYPES.add(PresentationUnit_2001);
			KNOWN_ELEMENT_TYPES.add(AbstractPresentation_2002);
			KNOWN_ELEMENT_TYPES.add(AbstractUIComponent_3001);
			KNOWN_ELEMENT_TYPES.add(MultipleChoice_3002);
			KNOWN_ELEMENT_TYPES.add(InputField_3003);
			KNOWN_ELEMENT_TYPES.add(OutputField_3004);
			KNOWN_ELEMENT_TYPES.add(Navigator_3005);
			KNOWN_ELEMENT_TYPES.add(SingleChoice_3006);
			KNOWN_ELEMENT_TYPES.add(Activator_3007);
			KNOWN_ELEMENT_TYPES.add(AbstractUIComponent_3009);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4001);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4002);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4003);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4004);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4005);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4006);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4007);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4008);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4009);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4010);
			KNOWN_ELEMENT_TYPES.add(UITemporalRelationship_4011);
			KNOWN_ELEMENT_TYPES.add(UIContainerRelationship_4012);
			KNOWN_ELEMENT_TYPES.add(PresentationContainerRelationship_4013);
			KNOWN_ELEMENT_TYPES.add(CommandDestinations_4014);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4015);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4016);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4017);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4018);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4019);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4020);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4021);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4022);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4023);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4024);
			KNOWN_ELEMENT_TYPES.add(PresentationTemporalRelationship_4025);
		}
		return KNOWN_ELEMENT_TYPES.contains(elementType);
	}

	/**
	 * @generated
	 */
	public static IElementType getElementType(int visualID) {
		switch (visualID) {
		case PresentationSystemEditPart.VISUAL_ID:
			return PresentationSystem_1000;
		case PresentationUnitEditPart.VISUAL_ID:
			return PresentationUnit_2001;
		case AbstractPresentationEditPart.VISUAL_ID:
			return AbstractPresentation_2002;
		case AbstractUIComponentEditPart.VISUAL_ID:
			return AbstractUIComponent_3001;
		case MultipleChoiceEditPart.VISUAL_ID:
			return MultipleChoice_3002;
		case InputFieldEditPart.VISUAL_ID:
			return InputField_3003;
		case OutputFieldEditPart.VISUAL_ID:
			return OutputField_3004;
		case NavigatorEditPart.VISUAL_ID:
			return Navigator_3005;
		case SingleChoiceEditPart.VISUAL_ID:
			return SingleChoice_3006;
		case ActivatorEditPart.VISUAL_ID:
			return Activator_3007;
		case AbstractUIComponent2EditPart.VISUAL_ID:
			return AbstractUIComponent_3009;
		case UITemporalRelationshipEditPart.VISUAL_ID:
			return UITemporalRelationship_4001;
		case UITemporalRelationship2EditPart.VISUAL_ID:
			return UITemporalRelationship_4002;
		case UITemporalRelationship3EditPart.VISUAL_ID:
			return UITemporalRelationship_4003;
		case UITemporalRelationship4EditPart.VISUAL_ID:
			return UITemporalRelationship_4004;
		case UITemporalRelationship5EditPart.VISUAL_ID:
			return UITemporalRelationship_4005;
		case UITemporalRelationship6EditPart.VISUAL_ID:
			return UITemporalRelationship_4006;
		case UITemporalRelationship7EditPart.VISUAL_ID:
			return UITemporalRelationship_4007;
		case UITemporalRelationship8EditPart.VISUAL_ID:
			return UITemporalRelationship_4008;
		case UITemporalRelationship9EditPart.VISUAL_ID:
			return UITemporalRelationship_4009;
		case UITemporalRelationship10EditPart.VISUAL_ID:
			return UITemporalRelationship_4010;
		case UITemporalRelationship11EditPart.VISUAL_ID:
			return UITemporalRelationship_4011;
		case UIContainerRelationshipEditPart.VISUAL_ID:
			return UIContainerRelationship_4012;
		case PresentationContainerRelationshipEditPart.VISUAL_ID:
			return PresentationContainerRelationship_4013;
		case CommandDestinationsEditPart.VISUAL_ID:
			return CommandDestinations_4014;
		case PresentationTemporalRelationshipEditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4015;
		case PresentationTemporalRelationship2EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4016;
		case PresentationTemporalRelationship3EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4017;
		case PresentationTemporalRelationship4EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4018;
		case PresentationTemporalRelationship5EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4019;
		case PresentationTemporalRelationship6EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4020;
		case PresentationTemporalRelationship7EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4021;
		case PresentationTemporalRelationship8EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4022;
		case PresentationTemporalRelationship9EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4023;
		case PresentationTemporalRelationship10EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4024;
		case PresentationTemporalRelationship11EditPart.VISUAL_ID:
			return PresentationTemporalRelationship_4025;
		}
		return null;
	}

}
